using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 易伤Buff数据
/// </summary>
[CreateAssetMenu(menuName = "创建ScriptableObject/BuffData/Vulnerability")]
public class VulnerabilityData : BuffData
{
    [Header("易伤效果设置")]
    [Tooltip("伤害倍率（1.0为正常伤害）")]
    [Range(1.0f, 3.0f)]
    public float DamageMultiplier = 1.5f;
    
    [Tooltip("是否可以被净化")]
    public bool CanBeCleansed = true;
    
    [Tooltip("是否可以被免疫")]
    public bool CanBeImmune = true;

    private void OnValidate()
    {
        // 确保BuffType正确设置
        if (BuffType != BuffType.Vulnerability)
        {
            BuffType = BuffType.Vulnerability;
        }
        
        // 设置默认标签
        if (Tags == BuffTag.None)
        {
            Tags = BuffTag.Debuff;
        }
    }
}